[SUBJECT]
Description=Calculate the air distances between selected world cities
ImageIndex=-1
Folder=Mathematics


[HEAD_TEXT]
;<!-- Cut-N-Paste JavaScript from ISN Toolbox 
;     Copyright 1996, Infohiway, Inc.  Restricted use is hereby
;     granted (commercial and personal OK) so long as this code
;     is not *directly* sold and the copyright notice is buried
;     somewhere deep in your HTML document.  A link to our site
;     http://www.infohiway.com is always appreciated of course,
;     but is absolutely and positively not necessary. ;-)   -->
;<script language="JavaScript">
;<!-- Hide from JavaScript-Impaired Browsers
;var l=0;
;var r=0;
;var tc="";
;var al=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789";
;var ns="0123456789";
;function iA(){
; this.length=iA.arguments.length;
; for (var i=0;i<this.length;i++){
;  this[i]=iA.arguments[i];
; }
;}
;/* 3011 byte database of air distances uses position in the
;   string "al" to substitute for the numerics, saving a bit
;   over 4k download to visitors. */
;var a=new iA(35);
;a[0]="Berlin, Germany*   ciagchdcheihh dadeee gcaa hdef egeghfaci"
;+"ibf da  cifdcd ebehe eddegagecehadhfaa gcgh e debbfageedkbgdca";
;a[1]="Bombay, India*   ibga deacde dhabfgh bbiifhgddfhg caefa igb"
;+"cacggiei dacigddcfbifbffgcgeaihbfchdj dggdcacbdcdaigfhbhf";
;a[2]="Buenos Aires, Argentina*   jbddbgiaceifkdfgefgegggffibfabk "
;+"dgbcdfchchec hhegfacchfhhkiggcfefhga abbfic gffialb ihfkd fbffdb";
;a[3]="Calcutta, India*   f ccgdeebaecg dcfefccdiehaebaieeeie cdeg"
;+"ibebgddfjaadhib bceagdhedaichde jiigbbbaaagicaig dchf";
;a[4]="Capetown, South Africa*   fiee hgcgkecebbjccf aiiggecfdahea"
;+"fbigh jaafdig aehdh edeighfgaacggebee  jb h ff bi gg bbce";
;a[5]="Darwin, Australia*   ibgbfdecfgcigaahf ghdaihaifi hg eiiffb"
;+"dh bjcehehcgcgafigbhfciifhaihifgfbcadb hccgccafda";
;a[6]="Gibraltar*   fhch hahgebga ieidgdhjh efcbdacfced agidic iff"
;+" abahcchb edgha cfdaedfffegbcfiil fda ";
;a[7]="Hong Kong, China*   eeddihefceihgbd fidfahghdddh edeeecdj h"
;+"eifabcdihgfef ck  eggkfafdg ggafeah eheeda";
;a[8]="Honolulu, Hawaii, USA*   ha bhbgbcbefec eeacghg cdifc  fghe"
;+"begdce ghgde  f hhaih bfgibfhdicfgachedgajhg";
;a[9]="Istanbul, Turkey*   ee aeefhdeffi iga a ie aea aebfgead dch"
;+" fidfdbeffd  hehagf fdifecgeefjffcca";
;a[10]="Juneau, Alaska, USA*   ddbahdehgh dcbbdecbhea id eddfdfcde"
;+"bfbbbffcbggf ebegbg i dhggbdd agdhhh ";
;a[11]="London, England, UK*   eddffgje eedaeecdfdch gaebh bae eba"
;+"eca aagegg higbfdghegafgdeidkfhdf ";
;a[12]="Los Angeles, California, USA*   gbggicaedf gbdebhheccc  ef"
;+" fbegecbehdcafc fcceec iffdhhggedgfgaj b";
;a[13]="Manilla, Luzon, Phillipines*   cidhhceachdidhbf bjbhffgagg"
;+"efbhabffekbefdfjicffdaaeadhahfeafegf";
;a[14]="Melbourne, Australia*   hdbhifjcfgefiici bjd efghffje jedh"
;+"aiiicg  haie acgfe iaf fh ";
;a[15]="Mexico City, Mexico*   ffib idcaegaae egaggcgfgbdedfbdggfc"
;+"ed ebcdh djcag dfi idh";
;a[16]="Moscow, Russia*   dffd da bfgaaedcf agadbdb fgb adghgieb d"
;+"bdebddfejbhdbg";
;a[17]="New York City, New York, USA*   cggcfgbbccfbfhbeei ddbehdh"
;+"bdbge ibdagcfifcfgdhiegg ";
;a[18]="Nome, Alaska, USA*   chdeeddegcdcegecdiccgheie hhcfaihcghf"
;+"aebihgchhba";
;a[19]="Oslo, Norway*   efi hcdcfbbacbfa hfdhabdgiadeie bfbeebbjig"
;+"dh ";
;a[20]="Panama City, Panama*   echhiagaebffdgacbiei bidcfeicbkfihd"
;+"bgdchbe";
;a[21]="Paris, France*   ea aihcbdacheg  fhgbediiegeffgf ckgidd ";
;a[22]="Peking, China*   dehfdbdi jgge ekgged  ffbggacafg eh ";
;a[23]="Port Said, Suez Canal, Egypt*   ebecbcfbdacbh ifgfeace ieh"
;+"djbebgc";
;a[24]="Quebec, Quebec, Canada*   baieaccidee bcefihia fdbibcgdd";
;a[25]="Reykjavik, Faxa Bay, Iceland*   fabb dgbccfaeefgafedgjgbegf";
;a[26]="Rio de Janeiro, Brazil*   efiahffhikcdiggkedgceeei";
;a[27]="Rome, Italy*   gdbeffefhfbcfabkebcga";
;a[28]="Santiago, Chile*   fbckfejbcjfdegigah";
;a[29]="Seattle, Washington, USA*   eg h fdghgbdicf";
;a[30]="Shanghai, China*   bcha if eeig";
;a[31]="Singapore, Singapore*   cc ebiddh";
;a[32]="Tokyo, Japan*   egfg d";
;a[33]="Wellington, New Zealand*   hab";
;a[34]="Zanzibar City, Tanzania*   ";
;var b=new iA(4);
;b[0]=1;
;b[1]=10;
;b[2]=100;
;b[3]=1000;
;b[4]=10000;
;function getMiles(form){
; lf=(document.isn.isn1.options[document.isn.isn1.selectedIndex].value);
; rf=(document.isn.isn2.options[document.isn.isn2.selectedIndex].value);
; l=al.indexOf(lf);
; r=al.indexOf(rf);
; if (r<l){
;  l=r;
;  r=al.indexOf(lf);
;  }
; ls=a[l];
; pos=ls.indexOf("*");
; ls1="From "+ls.substring(0,pos)+" to "
; +a[r].substring(0,a[r].indexOf("*"))+" is about ";
; ls=ls.substring(pos+1,ls.length);
; tc=ls.substring(((r*3)-(l*3)),ls.length);
; if (document.isn.rb[1].checked){
;  dispKm();
;  }
; else{
;  dispMi();
;  }
;}
;function dispMi(){
; ch=tc.charAt(0);
; ls1+=al.indexOf(ch);
; ch=tc.charAt(1);
; ls1+=al.indexOf(ch);
; ch=tc.charAt(2);
; if (ch!=" ")
; { ls1+=(al.indexOf(ch)*10)+" miles"; }
;  else ls1+="00"+" miles";
; document.isn.disp.value=ls1;
;}
;function dispKm(){
; ch=tc.charAt(0);
; km="";
; km+=al.indexOf(ch);
; ch=tc.charAt(1);
; km+=al.indexOf(ch);
; ch=tc.charAt(2);
; if (ch!=" "){
;  km+=(al.indexOf(ch)*10);
;  }
;  else{
;   km+="00";
;  }
;  num=0;
;  kml=km.length;
;  for (var i=kml-1;i>-1;i--){
;   cr=km.substring(i,i+1);
;   pos=ns.indexOf(cr);
;   num+=pos*b[kml-i-1];
;  }
;  km="";
;  km+=num*1.613;
;  pos=km.indexOf(".");
;  if (pos>-1){
;   km=km.substring(0,pos);
;  }
;  ls1+=km+" kilometers";
;  document.isn.disp.value=ls1;
;}
;// End Hiding -->
;</script>



[BODY_TEXT]
;
;<!-- Your Web Page Content Here -->
;
;<form name="isn">
;<table border="0" width="486" summary="">
;<tr><td colspan="3" align="center">
;<hr noshade><font color="blue">
;<b>`Caption`</b></font></td></tr>
;<tr><td align="center"><font color="blue">
;<b>Starting City</b></font><br><select name="isn1" size="12">
;<script language="JavaScript">
;<!-- Hide from JavaScript-Impaired Browsers
;ls="";
;for (var i=0;i<35;i++){
; ls+='<OPTION VALUE="'+al.substring(i,i+1)+'" onClick=""';
; if (i==0){ls+=' SELECTED';}
; ls+='>'+a[i].substring(0,a[i].indexOf("*"));
; }
;document.write(ls);
;// End hiding -->
;</script>
;</select></td>
;<td align="center" valign="top"><font color="blue" size="1">
;<b>Instructions:</b></font>
;<br>Select starting city at left, destination at right.
;Or, if you are feeling particularly contrary today,
;vice versa. Then click below.<p>
;<input type="button" name="but" value=" Get Distance " onClick="getMiles(this.form)">
;<br><input type="radio" name="rb" value="a" checked onClick="">Miles
;<input type="radio" name="rb" value="b" onClick="">Kilometers
;<td align="center"><font color="blue">
;<b>Destination City</b></font>
;<br><select name="isn2" size="12">
;<script language="JavaScript">
;<!-- Hide from JavaScript-Impaired Browsers
;ls="";
;for (var i=0;i<35;i++){
; ls+='<OPTION VALUE="'+al.substring(i,i+1)+'" onClick=""';
; if (i==1){ls+=' SELECTED';}
; ls+='>'+a[i].substring(0,a[i].indexOf("*"));
; }
;document.write(ls);
;// End hiding -->
;</script>
;</select></td></tr>
;<tr><td colspan="3" align="center">
;<table border="2" summary="">
;<tr><td>
;<input type="text" name="disp" value="" size="80">
;</td></tr>
;</table></td></tr>
;<tr><td colspan="3"><hr noshade></td></tr>
;</table>
;</form>


[`Caption`]
Kind=S
Value=Air Distances between Selected World Cities


